package com.twu.biblioteca;

/**
 * Created with IntelliJ IDEA.
 * User: miaveale
 * Date: 23/05/13
 * Time: 2:02 PM
 * To change this template use File | Settings | File Templates.
 */
public class Movie {

    private  String name;
    private  String year;
    private  String author;
    private  String rating;

    public  Movie(String name,String year,String author, String rating)
    {
        this.name = name;
        this.year = year;
        this.author = author;
        this.rating = rating;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getYear() {
        return year;
    }

    public void setYear(String year) {
        this.year = year;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getRating() {
        return rating;
    }

    public void setRating(int rating) {

        if( rating > 0 && rating <=10)
        {
            this.rating = Integer.toString(rating);
        }
        else
        {
            this.rating = "N/A";
        }
    }
}
